package com.homedo.microservice.open.service.gateway.alert.gateway.bean.enums.forzuulfilterdefault;

import java.util.HashMap;
import java.util.Map;


/**
 * 
 * @author 作者 jgshun
 * @date   创建时间 2018年09月14日 14时56分00秒
 */
public enum StatusEnum4ZuulFilterDefault {
		/**
		 * (short) 1, "可用"
		 */
		 	EFFECTIVE((short) 1, "可用"),
		/**
		 * (short) 0, "不可用"
		 */
		 	INVALID((short) 0, "不可用");

	private short code;
	private String msg;

	private StatusEnum4ZuulFilterDefault(short code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public short getCode() {
		return code;
	}

	public void setCode(short code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	
	public static StatusEnum4ZuulFilterDefault getStatusEnumByCode(short code) {
		for (StatusEnum4ZuulFilterDefault _enum : StatusEnum4ZuulFilterDefault.values()) {
			if (_enum.getCode() == code) {
				return _enum;
			}
		}
		return null;
	}
}
